/*
 * Exploder
 * 
 * Tero Pyylampi (218437), Jussi Tuurinkoski (211594)
 *
 * Abstract base class for all the objects in the game
 */

#include "GameObject.h"

// default constructor
GameObject::GameObject() : CCObject(), mCanBeRemoved( false ) {}

// default destructor
GameObject::~GameObject() {}

// default update function
void GameObject::update( cocos2d::ccTime dt ) {}

// force remove from the game
void GameObject::forceRemoveFromGame() {
	mCanBeRemoved = true;
}

// whether this object is to be removed from the game
bool GameObject::canBeRemovedFromTheGame() {
	return mCanBeRemoved;
}

// helper function to calculate distance between two objects
float calculateDistanceBetweenPositions( b2Vec2 pos1, b2Vec2 pos2 ) {
	return std::sqrt( std::pow( pos2.x - pos1.x, 2 ) - std::pow( pos2.y - pos1.y, 2 ) );
}
